package com.vincce.sport.mapper;

import java.util.List;
import java.util.Map;

import com.vincce.sport.core.MyBatisRepository;
import com.vincce.sport.entity.Page;
import com.vincce.sport.entity.ScoreTaskEntity;
import com.vincce.sport.entity.Team;
import com.vincce.sport.entity.TeamApi;
import com.vincce.sport.entity.TeamCreateImg;
import com.vincce.sport.entity.TeamDataMatchesApi;
import com.vincce.sport.entity.TeamDataTask;
import com.vincce.sport.entity.TeamDate;
import com.vincce.sport.entity.TeamDataApi;
import com.vincce.sport.entity.TeamImgApi;
import com.vincce.sport.entity.TeamStatuApi;
@MyBatisRepository
public interface TeamDateMapper {
	public List<TeamDate> queryTeamDateByPage(Page<TeamDate> page);
	public Long queryTeamDateByCount(Map<String, Object> map);
	public Long insertTeamDate(TeamDate teamDate);
	public Long updateTeamDate(TeamDate teamDate);
	public Integer deleteById(Integer id);
	public List<TeamDate> queryTeamDateByAll();
	public Integer getTotalPoint(Map map);
	
	public List<TeamDate> queryTeamDateSeason(Map<String, Object> map);
	public TeamDate querySeasonName(Map<String, Object> map);

	public List<TeamDate> queryTeamDateByContest(Map<String, Object> param);
	
	/**
	 * 查询赛程球队数据
	 * @param teamDate
	 * @return
	 */
	public TeamDate queryContestTeamDate(Map<String, Object> param);
	
	public List<Team> queryTeamDataBySchoolId(Map<String, Object> map);
	public List<TeamDate> queryTeamDateBy4condition(Map<String, Object> param);
	public List<TeamDate> queryTeamByOpponentId(Map map);
	public List<ScoreTaskEntity> queryTeamDateBy4conditionAll();
	public ScoreTaskEntity queryTeamDataToTaskByOpponentId(
			Map<String, Object> param);
	
	/**
	 * 获取小组球队得失分率最高的球队
	 * @param param
	 * @return
	 */
	public TeamDate queryScoreRate(Map<String, Object> param);
	
	/**
	 * 查询球队场均数据(得分。篮板，助攻)
	 * @param map
	 * @return
	 */
	public TeamDataTask queryTeamDataTask(Map<String, Object> map);
	
	public List<TeamDate> queryTeamDateHistory(Map<String, Object> map);
	/*
	 * 根据主队ID和对应赛程ID更新比分结果
	 */
	public List<ScoreTaskEntity> queryTeamDateByTeamAndContest(
			Map<String, Object> map);
	
	
	public List<TeamDataApi> queryTeamDateHistoryApi(Map<String, Object> map);
	public List<TeamApi> queryTeamApi(Map<String, Object> map);
	public List<TeamDataMatchesApi> getTeamDataApi(Map<String, Object> map);
	public List<TeamStatuApi> queryTeamByStatuApi(Map<String, Object> map);
	public List<TeamImgApi> queryTeamImgApi(Map<String, Object> map);
	public List<TeamCreateImg> createImgTeamByPlayerApi(Map<String, Object> map);
	public TeamCreateImg createImgTeamByPlayerApiOne(Map<String, Object> map);
}
